package com.hua.api.core.activemq.consumer.event.impl;

import com.alibaba.fastjson.JSONObject;
import com.hua.api.core.activemq.consumer.event.ActiveMqEvent;
import com.hua.api.core.activemq.consumer.event.EventConstant;
import com.hua.api.modules.order.service.OrderInfoLoggerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

// 订单日志消息
@Component(EventConstant.event_order_logger)
public class OrderLoggerEvent implements ActiveMqEvent {

    @Autowired
    private OrderInfoLoggerService orderInfoLoggerService;

    @Override
    public void doEvent(JSONObject data) {
        orderInfoLoggerService.saveOrderInfoLogger(data);
    }

}
